#!/usr/bin/env sh

cd ../server || exit 1

# 启动build-kit
buildkitd --config /etc/buildkit/buildkitd.toml > /dev/null 2>&1 &


# 构建镜像
buildctl build --local context=. --local dockerfile=docker/. \
  --frontend=dockerfile.v0 \
  --opt platform=linux/amd64 \
  --export-cache type=inline \
  --output type=image,name=docker.io/llqhz/nginx-demo:v1.0.0

# 部署镜像
kubectl apply -f k8s/nginx-demo.yaml



